<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%
    request.setCharacterEncoding("UTF-8");
    String htmlData = request.getParameter("content1") != null ? request.getParameter("content1") : "";
%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ include file="/WEB-INF/JSP/backHome/modalWindows/argeeCommon.jsp" %>
<%@ include file="/WEB-INF/JSP/backHome/modalWindows/againstAuditCommon.jsp" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Insert title here</title>
    <script type="text/javascript" src="<%=path%>/My97DatePicker/WdatePicker.js"></script>
    <script type="text/javascript" src="<%=path%>/HoganJS/handlebars-v4.0.11.js"></script>
    <link rel="stylesheet" type="text/css" href="<%=path%>/CSS/bombBox.css">
    <link rel="stylesheet" type="text/css" href="<%=path%>/CSS/backLayout.css">
    <style type="text/css">

        /**按钮样式**/
        .subtn1 {
            background: #57a0ff;
            border-radius: 50px;
            background: -webkit-linear-gradient(top, #57a0ff, #57a1ff);
            background: -moz-linear-gradient(top, #57a0ff, #57a1ff);
            background: linear-gradient(top, #57a0ff, #57a1ff);
            background: -ms-linear-gradient(top, #57a0ff, #57a1ff);
            border: 1px solid #2576A8;
            box-shadow: 0 1px 2px #8AC1E2 inset, 0 -1px 0 #57a0ff inset;
            color: #fff;
            height: 40px;
            text-shadow: 1px 1px 0.5px #22629B;
            outline: none;
        } 

       .btn {
            background: #57a0ff, background;
            border-radius: 50px;
            background: -webkit-linear-gradient(top, #57a0ff, #57a1ff);
            background: -moz-linear-gradient(top, #57a0ff, #57a1ff);
            background: linear-gradient(top, #57a0ff, #57a1ff);
            background: -ms-linear-gradient(top, #57a0ff, #57a1ff);
            border: 1px solid #2576A8;
            box-shadow: 0 1px 2px #8AC1E2 inset, 0 -1px 0 #57a0ff inset;
            color: #fff;
            height: 40px;
            text-shadow: 1px 1px 0.5px #22629B;
            outline: none;
        } 

        .subtn1:hover {
            background: -webkit-linear-gradient(top, #8DC9EF, #4E9FD1);
            background: -moz-linear-gradient(top, #8DC9EF, #4E9FD1);
            background: linear-gradient(top, #8DC9EF, #4E9FD1);
            background: -ms-linear-gradient(top, #8DC9EF, #4E9FD1);
        }

       /*  .btn:hover {
            background: -webkit-linear-gradient(top, #8DC9EF, #4E9FD1);
            background: -moz-linear-gradient(top, #8DC9EF, #4E9FD1);
            background: linear-gradient(top, #8DC9EF, #4E9FD1);
            background: -ms-linear-gradient(top, #8DC9EF, #4E9FD1);
        }  */
 
        .modal-data1 {
            visibility: hidden;
            z-index: 1001;
            width: 1000px;
            min-height: 500px;
            margin: 100px auto;
            background-color: #FFFFFF;
            /* border: 1px solid #C80B14;*/
            -moz-box-shadow: 0 10px 20px #8AC1E2 inset, 0 -10px 0 #57a0ff inset;
            -webkit-box-shadow: 0 10px 20px #8AC1E2 inset, 0 -10px 0 #57a0ff inset;
            /*         box-shadow:0 0 10px #cccccc;
                    box-shadow: #cccccc; */
            box-shadow: 0 10px 20px #57a1ff inset, 0 -10px 0 #57a0ff inset;
            padding: 5px;
            text-align: center;
            position: fixed;
            left: 22%;
        } 

         .modal-data1 td {
            padding-left: 15px;
            padding-right: 15px
        }

        .modal-data1 tr:FIRST-CHILD td {
            padding: 0px 10px;
        }

        .modal-data1 tr {
            padding-top: 30px
        }

        .modal-data1 form table {
            margin: 0px
        }

        input[type=checkbox] {
            padding: 0px;
            margin: 0px;
            text-align: right; 
            width: 15px
        }

     	 .div_zilei {
            width: 600px;
            height: 30px
        } 

        .tr {
            height: 40px;
            background: #57a0ff;
            font-weight:700;
        }

        .tr td {
            font-size: 14px;
            color: #ffffff
        }

        .tr_td {
            height: 40px;
        }

        .tr_td td {
            border-bottom: 1px solid #ededed;
            text-align: center;
        }

        tr td:nth-child(1) {
            font-size: 14px;
            color: #cccccc
        }

        .date {
            border: 0;
            background: #ffffff;
            text-align: center;
        }

        .tr_td td:nth-child(1) {
            border-left: 1px solid #cccccc;
        }

        .addTable.deleteTable:HOVER {
            cursor: pointer;
        }

        .fseq {
            width: 37px;
            border: 0;
            text-align: center;
            color: #cccccc
        } 

        .jczl {
           /* // padding-left: 100px; */
        }

        .div_tj {
            margin-top: 20px;
            margin-left: 310px;
        }

        .text {
            border: 0;
            background: #ffffff;
            text-align: center;
        }

        .remuneration1 {
            width: 150px;
            border: 0;
            background: #ffffff;
            text-align: center;
        }

        .loading {
            margin: 100px 450px;
            display: block;
            width: 65px;
            height: 65px;
            border: 1px solid #ddd;
            border-radius: 5px;
            opacity: .7;
            /*background: url(../images/loading.gif) no-repeat;*/
        }

        table {
            width: 100%;
        }

        table tr {
            height: 20px;
            padding-top: 20px;
        }

        input {
            width: 200px
        }

        table td {
            padding-top: 10px;
        }

        .botton {
            float: left;
            margin-left: 80px;

        }

        .botton input {
            width: 100px;
        }

        .botton span {
            width: 68px;
        }

        li span {
            margin-left: 20px;
            cursor: pointer;
        }

        li span:hover {
            color: #427dff
        } 
        span input {
    	width: 120px;
		}
    </style>
</head>
<body style="background: #f5f5f5">
<div class="main">
    <div class="weizhi">
        <c:if test="${simulationQuarge.cfbizstate eq 3 }">
            考试管理>>模拟考试合格登记>>修改
        </c:if>
        <c:if test="${simulationQuarge.cfbizstate eq 4 || simulationQuarge.cfbizstate eq 5 }">
            考试管理>>模拟考试合格登记>>查看
        </c:if>
    </div>
    <div class="div_body" style="box-shadow: 0 0 5px #cccccc;">
        <div id="modal-overlay">

        </div>
         <div class="modal-data1">
            <div style="height: 60px">
                <ul>
                    <li style="text-align: left;height: 40px;line-height: 40px">
                        <span style="margin-left: 20px;">名称:</span>
                        <span style="margin-left: 0px;">
				  		 	<input class="name1" type="text">
				  		</span>
                        <span>电话号码:</span>
                        <span style="margin-left: 0px;">
				  		 	<input class="cflxdh" type="text">
				  		</span>
                        <span style="margin-left: 20px;">开始时间:</span><span style="margin-left: 0px;"><input class="scinput1" name="beginTime"
                                                                                  type="text"
                                                                                  onfocus="WdatePicker({maxDate:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}',dateFmt:'yyyy-MM-dd'})"
                                                                                  id="datemin" class="input-text"
                                                                                  style="width:90px;"
                                                                                  value="${beginTime}"></span>
                        <span>结束时间:</span><span style="margin-left: 0px;"><input class="scinput1" name="endTime" type="text"
                                                       onfocus="WdatePicker({minDate:'#F{$dp.$D(\'datemin\')}',maxDate:'%y-%M-%d',dateFmt:'yyyy-MM-dd'})"
                                                       id="datemax" class="input-text" style="width:90px;"
                                                       value="${endTime}"></span>
                        <span style="margin-left: -20px;">
				  			<button class="findBtn1">
				  				查询
				  			</button>
				  		</span>
                    </li>
                </ul>
            </div>
            <div style="width:1000px; height:350px; overflow:scroll;">
                <form action="">
                    <table class="head1" id="studebntList" style="width: auto;white-space:nowrap;border-spacing:0px">
                        <tr style="background: #f2f2f2;height: 30px;line-height: 20px;" class="sel td">
                            <td style="width: 20px"></td>
                            <td>
                                编码
                            </td>
                            <td>
                                名称
                            </td>                        
                            <td>
                                身份证号码
                            </td>
                            <td>
                            	手机
                            </td>
                            <td>
                                申请准驾车型代号
                            </td>
                            <td>
                                入学日期
                            </td>
                            <td>
                                班级
                            </td>
                            <td>
                                应收金额
                            </td>
                            <td>
                                学员状态
                            </td>
                            <td>
                                已收
                            </td>
                            <td>
                                优惠
                            </td>
                            <td>
                                欠费
                            </td>
                            <td>
                                本校外校
                            </td>
                            <td>
                                拼音首字母
                            </td>
                            <td>
                                驾校
                            </td>
                            <td>
                                科目一考试次数
                            </td>
                            <td>
                                科目二考试次数
                            </td>
                            <td>
                                科目三考试次数
                            </td>
                            <td>
                                科目一合格日期
                            </td>
                            <td>
                                科目二合格日期
                            </td>
                            <td>
                                科目三合格日期
                            </td>
                            <td>
                                科目一不及格时间
                            </td>
                            <td>
                                科目二不及格时间
                            </td>
                            <td>
                                科目三不及格时间
                            </td>                         
                        </tr>
                        <c:forEach items="${students}" var="student" varStatus="s">
                        <tr class="xysj">
                            <td class="td"><input type="checkbox" name="remuneration1" style="width: 15px;"
                                       value="${student.fid}"/></td>
                            <td>${student.fnumber}</td>
                            <td>${student.fnameL2}</td>
                            <td>${student.cfidcardno}</td>
                            <td>${student.cfsjhm}</td>
                            <td>${student.cfslzjcxdh}</td>
                            <td>${student.cfrxsj}</td>
                            <td>${student.cfclazzName}</td>
                            <td>${student.cfamount}</td>
                            <c:if test="${student.cfstudentstate eq 1}">
                                <td>已报名</td>
                            </c:if>
                            <c:if test="${student.cfstudentstate eq 2}">
                                <td>科目一通过</td>
                            </c:if>
                            <c:if test="${student.cfstudentstate eq 3}">
                                <td>科目一未通过</td>
                            </c:if>
                            <c:if test="${student.cfstudentstate eq 4}">
                                <td>科目二通过</td>
                            </c:if>
                            <c:if test="${student.cfstudentstate eq 5}">
                                <td>科目二未通过</td>
                            </c:if>
                            <c:if test="${student.cfstudentstate eq 6}">
                                <td>科目二练车中</td>
                            </c:if>
                            <c:if test="${student.cfstudentstate eq 7}">
                                <td>科目三通过</td>
                            </c:if>
                            <c:if test="${student.cfstudentstate eq 8}">
                                <td>科目三未通过</td>
                            </c:if>
                            <c:if test="${student.cfstudentstate eq 9}">
                                <td>科目三练车中</td>
                            </c:if>
                            <c:if test="${student.cfstudentstate eq 10}">
                                <td>已结业</td>
                            </c:if>
                            <c:if test="${student.cfstudentstate eq 11}">
                                <td>已退学</td>
                            </c:if>
                            <c:if test="${student.cfstudentstate eq 12}">
                                <td>模拟考试合格</td>
                            </c:if>
                            <c:if test="${student.cfstudentstate eq 13}">
                                <td>已过期</td>
                            </c:if>
                            <c:if test="${student.cfstudentstate eq 14}">
                                <td>作废</td>
                            </c:if>
                            <td>${student.cfreceived}</td>
                            <td>${student.cffavorable}</td>
                            <td>${student.cfarrearage}</td>
                            <c:if test="${student.cfbxwx eq 1}">
                                <td>本校</td>
                            </c:if>
                            <c:if test="${student.cfbxwx eq 2}">
                                <td>外校</td>
                            </c:if>
                            <c:if test="${student.cfbxwx ne 1 && student.cfbxwx ne 2 }">
                                <td></td>
                            </c:if>
                            <td>${student.cfpinyin}</td>
                            <td>${student.cfficompanyName}</td>
                            <td>${student.cfkmykss}</td>
                            <td>${student.cfkmekss}</td>
                            <td>${student.cfkmskss}</td>
                            <td>${student.cfkmyherq}</td>
                            <td>${student.cfkmehgrq}</td>
                            <td>${student.cfkmshgrq}</td>
                            <td>${student.cfkmybjgsj}</td>
                            <td>${student.cfkmebjgsj}</td>
                            <td>${student.cfkmsbjgsj}</td>                          
                        </tr>
                        </c:forEach>
                    </table>
                </form>
            </div> 
             <div class="page" style="display: none;">
                <ul style="border-bottom: none;">
                    <li>
                        <span onclick="" class="indexPage">首页</span>
                        <span onclick="" class="prevPage">上一页</span>
                        <span onclick="" class="nextPage">下一页</span>
                        <span onclick="" class="endPage">尾页</span>
                        <input type="hidden" id="totalPage" value='${pb}'>
                        <input type="hidden" id="index" value="1">
                    </li>
                </ul>
            </div>

             <button class="subtn1" style="width: 150px;position: absolute;bottom: 35px;font-size: 16px;left: 250px">
                确定
            </button>
             <button class="btn" style="width: 150px;position: absolute;bottom: 35px;font-size: 16px;right: 250px">
                关闭
            </button>

        </div>
        
        <c:if test="${simulationQuarge.cfbizstate eq 3 }">
        <div class="div_form">
            <form id="update_simulationQuarge" action="<%=path%>/DrivingSys/updateSimulationQuarge" class="form" method="post" onsubmit="return subForm()">
                <input  type="hidden" name="fid" style="visibility:hidden" value="${simulationQuarge.fid }"/>
                <div class="jczl">
                 <div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">驾校&nbsp;:&nbsp;</span>
							<input type="hidden" name="fcontrolunitid" value="${department.fid }">
							<input  type="text" name="drivingSchool"  value="${department.fnameL2}" readonly="readonly" style="color: gray;"/>
							
						</div>
						<div class="input_hang">
							<span class="gn_name">单据编号&nbsp;:&nbsp;</span>
							<input type="text" class="fnumber" name="fnumber" readonly="readonly" value="${simulationQuarge.fnumber }" style="color: gray;">
						</div>
						<div class="input_hang">
							<span class="gn_name">业务日期&nbsp;:&nbsp;</span>
							<input type="text" class="fbizdate" id="fbizdate"  value="${simulationQuarge.fbizdate}" name="fbizdate">
                         <img onclick="WdatePicker({el:'fbizdate',dateFmt:'yyyy-MM-dd '})"
                             src="<%=path%>/image/date.jpg" align="absmiddle" style="padding-left: 15px">
						</div>
					</div>
					<div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">参考信息&nbsp;:&nbsp;</span>
							<input  type="text" name="fdescription"  value="${simulationQuarge.fdescription }"  style="color: gray;"/>
						</div>
						<div class="input_hang">
							<span class="gn_name">单据状态&nbsp;:&nbsp;</span>
							<select  name="cfbizstate"   readonly="readonly"  style="width: 205px;height: 31px;color: grey;" id="cfstateId" >
                                <c:if test="${simulationQuarge.cfbizstate eq 3 }">
                    	    	    <option id="cfbizstate" selected="selected" value="3" >保存</option>
                                </c:if>
                    		</select>
						</div>
						
					</div>

                    <div class="div_zilei">
                        <div style="width: 380px;text-align: right;float: left;">
                            <img src="<%=path%>/image/insert2323.jpg" class="addTable">
                            <span style="padding-right: 20px;color: #57a0ff;font-weight:700;color: #a9bbe0;font-size: 14px"
                                  class="addTable">添加</span>
                            <img src="<%=path%>/image/delete212.png" class="deleteTable">
                            <span class="deleteTable" style="color: #57a0ff;font-weight:700;font-size: 14px"
                                  class="deleteTable">删除</span>
                        </div>
                    </div>
                    <div style="border: 1px solid #cccccc; overflow:auto;height:230px;width: 87%;  margin-left:100px">
                        <table id="recordinList" width="100%"
                               style="min-height:30px;overflow:auto;border-spacing:0;">
                            <tr class="tr">
                            	<td align="center">序号</td>                              
                                <td align="center">学员</td>                              
                                <td align="center">身份证号码</td>                              
                                <td align="center">性别</td>
                                <td align="center">手机号码</td>
                                <td align="center">考试分数</td>
                                <td align="center">备注 </td>                               
                            </tr>
                            <c:forEach items="${simulationQuarge.simulationQuargentryList }" var="simulationQuargentry">
                            <tr class="tr_td">
                            	<td align="center">
                            	<input type="text" class="fseq" name="sfseq"
                   				value="${simulationQuargentry.fseq }" readonly="readonly">
                   				<input type="hidden" name="sstuid" value="${simulationQuargentry.cfstudentid }">
                   				</td>
                            	<td align="center">
                            		<input type="text" class="remuneration1" name="stuname"
                   					value="${simulationQuargentry.studentName }" onclick="clickName($(this))"></td>
                            	<td align="center">
                            	<input type="text" class="remuneration1" name="scfidcardno"
                   					value="${simulationQuargentry.cfidcardno } " >
                            	</td>
                            	<c:if test="${simulationQuargentry.cfsex eq 1 }">
                            		<td align="center"><input type="text" class="remuneration1" name="scfsex" class="text" value="男"/></td>
                            	</c:if>
                            	<c:if test="${simulationQuargentry.cfsex eq 2 }">
                            		<td align="center"><input class="remuneration1" type="text" name="scfsex" class="text" value="女"/></td>
                            	</c:if>
                            	<td align="center">
                            	<input type="text" class="remuneration1" name="cfsjhm" value="${simulationQuargentry.cfmobile }">
                            	</td>
                            	<td align="center">
                            		<input type="text" class="remuneration1 scfgrade" name="scfgrade" value="${simulationQuargentry.cfgrade}"/>
                            	</td>
                            	<td align="center">
                            		<input type="text" class="remuneration1" name="scfremark" value="${simulationQuargentry.cfremark }"/>
                            	</td>
                            </tr>
                            </c:forEach>
                        </table>
                    </div>
                <div class="div_input_hang">
						
				</div>
                <div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">审核人&nbsp;:&nbsp;</span>
							<input  type="text" name=""  value="" readonly="readonly" style="color: gray;"/>
						</div>
						<div class="input_hang">
							<span class="gn_name">创建者&nbsp;:&nbsp;</span>
							<input type="text" class="fnumber" name="" readonly="readonly" value="${simulationQuarge.createName }" style="color: gray;">
							<input type="hidden" name="fcreatorid" value="${user.fid }">
						</div>
						<div class="input_hang">
							<span class="gn_name">创建时间&nbsp;:&nbsp;</span>
							<input type="text"  readonly="readonly" value="${simulationQuarge.fcreatetime }" name="fcreatetime" style="color: gray;">
                        <%-- <img onclick="WdatePicker({el:'fbizdate',dateFmt:'yyyy-MM-dd '})"
                             src="<%=path%>/image/date.jpg" align="absmiddle" style="padding-left: 15px"> --%>
						</div>
					</div>
                <div class="div_tj" style="margin-left: 100px;width: 800px;">
               	 <%--<c:if test="${simulationQuarge.cfbizstate eq 3}">
                            <div>
                                <input type="button" class="input_submit" value="审   核" onclick="audit()"/>
                            </div>
                 </c:if>--%>
                    <shiro:hasPermission name="/sureSimulationQuarge">
                        <div>
                            <input type="submit" class="input_submit bc" id="input_sure" value="">
                        </div>
                    </shiro:hasPermission>

                     <shiro:hasPermission name="/submitSimulationQuarge">
                         <div>
                             <input type="button" class="input_submit tj"  value="" onclick="audit(4)">
                         </div>
                     </shiro:hasPermission>
                     <div>
                         <input type="button" class="input_submit cklc" value="" onclick="lookActivitiImg('publicProcess',$('.fnumber').val())">
                     </div>
                     <%--<div>
                         <input type="button" class="input_submit"  value="审   核" onclick="audit()">
                     </div>--%>
                    <div>
                        <input type="button" class="input_back fh" value="" onclick="back()"/>
                    </div>
                </div>
                </div>
            </form>
        </div>
        </c:if>

        <c:if test="${simulationQuarge.cfbizstate eq 4 }">
            <div class="div_form">
                <form id="update_simulationQuarge" action="<%=path%>/DrivingSys/updateSimulationQuarge" class="form" method="post">
                    <input  type="hidden" name="fid" style="visibility:hidden" value="${simulationQuarge.fid }"/>
                    <div class="jczl">
                        <div class="div_input_hang">
                            <div class="input_hang">
                                <span class="gn_name">驾校&nbsp;:&nbsp;</span>
                                <input type="hidden" name="fcontrolunitid" value="${department.fid }">
                                <input  type="text" name="drivingSchool"  value="${department.fnameL2}" readonly="readonly" style="color: gray;"/>

                            </div>
                            <div class="input_hang">
                                <span class="gn_name">单据编号&nbsp;:&nbsp;</span>
                                <input type="text" class="fnumber" name="fnumber" readonly="readonly" value="${simulationQuarge.fnumber }" style="color: gray;">
                            </div>
                            <div class="input_hang">
                                <span class="gn_name">业务日期&nbsp;:&nbsp;</span>
                                <input type="text" class="fbizdate" id="fbizdate" readonly="readonly" value="${simulationQuarge.fbizdate}" name="fbizdate">
                                    <%-- <img onclick="WdatePicker({el:'fbizdate',dateFmt:'yyyy-MM-dd '})"
                                         src="<%=path%>/image/date.jpg" align="absmiddle" style="padding-left: 15px"> --%>
                            </div>
                        </div>
                        <div class="div_input_hang">
                            <div class="input_hang">
                                <span class="gn_name">参考信息&nbsp;:&nbsp;</span>
                                <input  type="text" name="fdescription"  value="${simulationQuarge.fdescription }"  style="color: gray;"/>
                            </div>
                            <div class="input_hang">
                                <span class="gn_name">单据状态&nbsp;:&nbsp;</span>
                                <select  name="cfbizstate"   readonly="readonly"  style="width: 205px;height: 31px;color: grey;" id="cfstateId" >
                                    <c:if test="${simulationQuarge.cfbizstate eq 4 }">
                                        <option id="cfbizstate" selected="selected" value="4" >提交</option>
                                    </c:if>
                                </select>
                            </div>

                        </div>

                       <%-- <div class="div_zilei">
                            <div style="width: 380px;text-align: right;float: left;">
                                <img src="<%=path%>/image/insert2323.jpg" class="addTable">
                                <span style="padding-right: 20px;color: #a9bbe0;font-size: 14px"
                                      class="addTable">添加</span>
                                <img src="<%=path%>/image/delete212.png" class="deleteTable">
                                <span class="deleteTable" style="color: #a9bbe0;font-size: 14px"
                                      class="deleteTable">删除</span>
                            </div>
                        </div>--%>
                        <div style="border: 1px solid #cccccc; overflow:auto;height:230px;width: 87%;  margin-left:100px">
                            <table id="recordinList" width="100%"
                                   style="min-height:30px;overflow:auto;border-spacing:0;">
                                <tr class="tr">
                                    <td align="center">序号</td>
                                    <td align="center">学员</td>
                                    <td align="center">身份证号码</td>
                                    <td align="center">性别</td>
                                    <td align="center">手机号码</td>
                                    <td align="center">考试分数</td>
                                    <td align="center">备注 </td>
                                </tr>
                                <c:forEach items="${simulationQuarge.simulationQuargentryList }" var="simulationQuargentry">
                                    <tr class="tr_td">
                                        <td align="center">
                                            <input type="text" class="fseq" name="sfseq"
                                                   value="${simulationQuargentry.fseq }" readonly="readonly">
                                            <input type="hidden" name="sstuid" value="${simulationQuargentry.cfstudentid }">
                                        </td>
                                        <td align="center">
                                            <input type="text" class="remuneration1" name="stuname"
                                                   value="${simulationQuargentry.studentName }" onclick="clickName($(this))"></td>
                                        <td align="center">
                                            <input type="text" class="remuneration1" name="scfidcardno"
                                                   value="${simulationQuargentry.cfidcardno } " >
                                        </td>
                                        <c:if test="${simulationQuargentry.cfsex eq 1 }">
                                            <td align="center"><input type="text" class="remuneration1" name="scfsex" class="text" value="男"/></td>
                                        </c:if>
                                        <c:if test="${simulationQuargentry.cfsex eq 2 }">
                                            <td align="center"><input class="remuneration1" type="text" name="scfsex" class="text" value="女"/></td>
                                        </c:if>
                                        <td align="center">
                                            <input type="text" class="remuneration1" name="cfsjhm" value="${simulationQuargentry.cfmobile }">
                                        </td>
                                        <td align="center">
                                            <input type="text" class="remuneration1" name="scfgrade" value="${simulationQuargentry.cfgrade}"/>
                                        </td>
                                        <td align="center">
                                            <input type="text" class="remuneration1" name="scfremark" value="${simulationQuargentry.cfremark }"/>
                                        </td>
                                    </tr>
                                </c:forEach>
                            </table>
                        </div>
                        <div class="div_input_hang">

                        </div>
                        <div class="div_input_hang">
                            <div class="input_hang">
                                <span class="gn_name">审核人&nbsp;:&nbsp;</span>
                                <input  type="text" name=""  value="" readonly="readonly" style="color: gray;"/>
                            </div>
                            <div class="input_hang">
                                <span class="gn_name">创建者&nbsp;:&nbsp;</span>
                                <input type="text" class="fnumber" name="" readonly="readonly" value="${simulationQuarge.createName }" style="color: gray;">
                                <input type="hidden" name="fcreatorid" value="${user.fid }">
                            </div>
                            <div class="input_hang">
                                <span class="gn_name">创建时间&nbsp;:&nbsp;</span>
                                <input type="text"  readonly="readonly" value="${simulationQuarge.fcreatetime }" name="fcreatetime" style="color: gray;">
                                    <%-- <img onclick="WdatePicker({el:'fbizdate',dateFmt:'yyyy-MM-dd '})"
                                         src="<%=path%>/image/date.jpg" align="absmiddle" style="padding-left: 15px"> --%>
                            </div>
                        </div>
                        <div class="div_tj" style="margin-left: 100px;width: 800px;">
                            <shiro:hasPermission name="/auditSimulationQuarge">
                                <div>
                                    <input type="button" class="input_submit sh"  value="" onclick="audit(5)">
                                </div>
                            </shiro:hasPermission>
                            <shiro:hasPermission name="/againstAuditSimulationQuarge">
                                <div>
                                    <input type="button" class="input_submit fsh"  value="" onclick="audit(3)">
                                </div>
                            </shiro:hasPermission>
                            <div>
                                <input type="button" class="input_submit cklc" value="" onclick="lookActivitiImg('publicProcess',$('.fnumber').val())">
                            </div>
                            <div>
                                <input type="button" class="input_back fh" value="" onclick="back()"/>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </c:if>

         <c:if test="${simulationQuarge.cfbizstate eq 5}">
        <div class="div_form">
            <form id="update_simulationQuarge" action="<%=path%>/DrivingSys/updateSimulationQuarge" class="form" method="post">
                <input  type="hidden" name="fid" style="visibility:hidden" value="${simulationQuarge.fid }"/>
                <div class="jczl">
                 <div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">驾校&nbsp;:&nbsp;</span>
							<input type="hidden" name="fcontrolunitid" value="${department.fid }">
							<input  type="text" name="drivingSchool"  value="${department.fnameL2}" readonly="readonly" style="color: gray;"/>
							
						</div>
						<div class="input_hang">
							<span class="gn_name">单据编号&nbsp;:&nbsp;</span>
							<input  type="text" class="fnumber" name="fnumber" readonly="readonly" value="${simulationQuarge.fnumber }">
						</div>
						<div class="input_hang">
							<span class="gn_name">业务日期&nbsp;:&nbsp;</span>
							<input  type="text" class="fbizdate" id="fbizdate" readonly="readonly" value="${simulationQuarge.fbizdate}" name="fbizdate">
                        <%-- <img onclick="WdatePicker({el:'fbizdate',dateFmt:'yyyy-MM-dd '})"
                             src="<%=path%>/image/date.jpg" align="absmiddle" style="padding-left: 15px"> --%>
						</div>
					</div>
					<div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">参考信息&nbsp;:&nbsp;</span>
							<input  readonly="readonly" type="text" name="fdescription"  value="${simulationQuarge.fdescription }"  style="color: gray;"/>
						</div>
						<div class="input_hang">
							<span class="gn_name">单据状态&nbsp;:&nbsp;</span>
							
							<select  name="cfbizstate"  style="width: 205px;height: 31px;color: grey;" >
                    	    	<option  id="cfbizstate" selected="selected" value="5" >审核</option>
                    		</select>
						</div>
						
					</div>
					<%--<c:if test="${simulationQuarge.cfbizstate eq 3}">
                    <div class="div_zilei">
                        <div style="width: 380px;text-align: right;float: left;">
                            <img src="<%=path%>/image/insert2323.jpg" class="addTable">
                            <span style="padding-right: 20px;color: #a9bbe0;font-size: 14px"
                                  class="addTable">添加</span>
                            <img src="<%=path%>/image/delete212.png" class="deleteTable">
                            <span class="deleteTable" style="color: #a9bbe0;font-size: 14px"
                                  class="deleteTable">删除</span>
                        </div>
                    </div>
                    </c:if>--%>
                    <div style="border: 1px solid #cccccc; overflow:auto;height:230px;width: 87%;  margin-left:100px">
                        <table id="recordinList" width="100%"
                               style="min-height:30px;overflow:auto;border-spacing:0;">
                            <tr class="tr">
                            	<td align="center">序号</td>                              
                                <td align="center">学员</td>                              
                                <td align="center">身份证号码</td>                              
                                <td align="center">性别</td>
                                <td align="center">手机号码</td>
                                <td align="center">考试分数</td>
                                <td align="center">备注 </td>                               
                            </tr>
                            <c:forEach items="${simulationQuarge.simulationQuargentryList }" var="simulationQuargentry">
                            <tr class="tr_td">
                            	<td align="center">
                            	<input type="text" class="fseq" name="sfseq"
                   				value="${simulationQuargentry.fseq }" readonly="readonly">
                   				<input type="hidden" name="sstuid" value="${simulationQuargentry.cfstudentid }">
                   				</td>
                            	<td align="center">
                            		<input readonly="readonly" type="text" class="remuneration1" name="stuname"
                   					value="${simulationQuargentry.studentName }" onclick="clickName($(this))"></td>
                            	<td align="center">
                            	<input readonly="readonly" type="text" class="remuneration1" name="scfidcardno"
                   					value="${simulationQuargentry.cfidcardno } " >
                            	</td>
                            	<c:if test="${simulationQuargentry.cfsex eq 1 }">
                            		<td align="center"><input readonly="readonly" type="text" class="remuneration1" name="scfsex" class="text" value="男"/></td>
                            	</c:if>
                            	<c:if test="${simulationQuargentry.cfsex eq 2 }">
                            		<td align="center"><input readonly="readonly" class="remuneration1" type="text" name="scfsex" class="text" value="女"/></td>
                            	</c:if>
                            	<td align="center">
                            	<input type="text" readonly="readonly" class="remuneration1" name="cfsjhm" value="${simulationQuargentry.cfmobile }">
                            	</td>
                            	<td align="center">
                            		<input type="text" readonly="readonly" class="remuneration1" name="scfgrade" value="${simulationQuargentry.cfgrade}"/>
                            	</td>
                            	<td align="center">
                            		<input type="text" readonly="readonly" class="remuneration1" name="scfremark" value="${simulationQuargentry.cfremark }"/>
                            	</td>
                            </tr>
                            </c:forEach>
                        </table>
                    </div>
                <div class="div_input_hang">
						
				</div>
                <div class="div_input_hang">
						<div class="input_hang">
							<span class="gn_name">审核人&nbsp;:&nbsp;</span>
							<input  type="text" name=""  value="${simulationQuarge.checkName }" readonly="readonly" style="color: gray;"/>
						</div>
						<div class="input_hang">
							<span class="gn_name">创建者&nbsp;:&nbsp;</span>
							<input  type="text" class="fnumber" name="" readonly="readonly" value="${simulationQuarge.createName }" style="color: gray;">
							<input type="hidden" name="fcreatorid" value="${user.fid }">
						</div>
						<div class="input_hang">
							<span class="gn_name">创建时间&nbsp;:&nbsp;</span>
							<input  type="text"  readonly="readonly" value="${simulationQuarge.fcreatetime }" name="fcreatetime" style="color: gray;">
                        <%-- <img onclick="WdatePicker({el:'fbizdate',dateFmt:'yyyy-MM-dd '})"
                             src="<%=path%>/image/date.jpg" align="absmiddle" style="padding-left: 15px"> --%>
						</div>
					</div>
                <div class="div_tj" style="margin-left: 100px;">
                    <%--<div>
                        <input type="submit"  class="input_submit" id="input_sure" value="确   定">
                    </div>
                    <div>
                        <input type="button" class="input_submit" value="提   交">
                    </div>--%>
                    <shiro:hasPermission name="/againstAuditSimulationQuarge">
                        <div>
                            <input type="button" class="input_submit fsh"  value="" onclick="audit(3)">
                        </div>
                    </shiro:hasPermission>
                    <div>
                        <input type="button" class="input_submit cklc" value="" onclick="lookActivitiImg('publicProcess',$('.fnumber').val())">
                    </div>
                    <div>
                        <input type="button" class="input_back fh" value="" onclick="back()"/>
                    </div>
                </div>
                </div>
            </form>
        </div>
        </c:if>
    </div>
</div>
</body>
<script type="text/javascript" src="<%=path%>/JQuery/jquery-1.8.2.js"></script>
<%@ include file="/WEB-INF/JSP/ajax.jsp" %>
<script id="table-template" type="text/x-handlebars-template">
        {{#isNull sList}}
    <tr style="background: #f2f2f2;height: 30px;line-height: 20px;" class="sel">
        <th style="width: 20px"></th>
        <td>编码</td>
		<td>名称</td>                        
		<td>身份证号码</td>
        <td>手机</td>
        <td>申请准驾车型代号</td>
        <td>入学日期</td>
		<td>班级</td>
        <td>应收金额</td>
        <td>学员状态</td>
        <td>已收</td>
		<td>优惠</td>
		<td>欠费</td>
        <td>本校外校</td>
        <td>拼音首字母</td>
        <td>驾校</td>
		<td>科目一考试次数</td>
        <td>科目二考试次数</td>
        <td>科目三考试次数</td>
        <td>科目一合格日期</td>
		<td>科目二合格日期</td>
        <td>科目三合格日期</td>
		<td>科目一不及格时间</td>
        <td>科目二不及格时间</td>
        <td>科目三不及格时间</td> 
    </tr>
    {{#each sList}}
    <tr class="xysj">
        <td style="display: none;width: 20px;" class="sq"><input type="text" class="fseq" name="fid" value="{{fid}}"
        ></td>
        <td class="td"><input type="checkbox" value="{{fid}}" name="remuneration1"/></td>
        <td>{{fnumber}}</td>
        <td>{{fnameL2}}</td>
        <td>{{cfidcardno}}</td>
        <td>{{cfsjhm}}</td>
        <td>{{cfslzjcxdh}}</td>
        <td>{{cfrxsj}}</td>
        <td>{{cfclazzName}}</td>
        <td>{{cfamount}}</td>
		{{#compare cfstudentstate 1}}
        <td>已报名</td>
		{{/compare}} 
        {{#compare cfstudentstate 2}}
        <td>科目一通过</td>
		{{/compare}} 
		{{#compare cfstudentstate 3}}
        <td>科目一未通过</td>
		{{/compare}} 
		{{#compare cfstudentstate 4}}
        <td>科目二通过</td>
		{{/compare}} 
		{{#compare cfstudentstate 6}}
        <td>科目二未通过</td>
		{{/compare}} 
		{{#compare cfstudentstate 6}}
        <td>科目二练车中</td>
		{{/compare}} 
		{{#compare cfstudentstate 7}}
        <td>科目三通过</td>
		{{/compare}} 
		{{#compare cfstudentstate 8}}
        <td>科目三未通过</td>
		{{/compare}} 
		{{#compare cfstudentstate 9}}
        <td>科目三练车中</td>
		{{/compare}} 
		{{#compare cfstudentstate 10}}
        <td>已结业</td>
		{{/compare}} 
		{{#compare cfstudentstate 11}}
        <td>已退学</td>
		{{/compare}} 
		{{#compare cfstudentstate 12}}
        <td>模拟考试合格</td>
		{{/compare}} 
		{{#compare cfstudentstate 13}}
        <td>已过期</td>
		{{/compare}} 
		{{#compare cfstudentstate 14}}
        <td>已作废</td>
		{{/compare}} 
      	<td>{{cfreceived}}</td>
        <td>{{cffavorable}}</td>
        <td>{{cfarrearage}}</td>
		{{#compare cfbxwx 1}}
        <td>本校</td>
        {{else}}
        <td>外校</td> 
		{{/compare}}   
		<td>{{cfpinyin}}</td>
        <td>{{cfficompanyName}}</td>
        <td>{{cfkmykss}}</td>
        <td>{{cfkmekss}}</td>
        <td>{{cfkmskss}}</td>
        <td>{{cfkmyherq}}</td>
        <td>{{cfkmehgrq}}</td>
        <td>{{cfkmshgrq}}</td>
        <td>{{cfkmybjgsj}}</td>
        <td>{{cfkmebjgsj}}</td>
        <td>{{cfkmsbjgsj}}</td>    
    </tr>
    {{/each}}
    {{else}}
    <td>没有搜索到您想要的内容!</td>
    {{/isNull}}

</script>

<script id="table-template1" type="text/x-handlebars-template">
    {{#each studentsNameList}}
    <tr align="left" class="tr_td">
        <td style="display: none;width: 20px;">
            <input type="text" name="sfid" value=""/>
        </td>
        <td class="rstuname" style="display: none;width: 20px;">
            <input type="text" name="sstuid" value='{{fid}}'/>
			<input type="display: none;" name="cfsjhm" value='{{cfsjhm}}'/>
        </td>
        <td>
            <input type="text" class="fseq" name="sfseq"
                   value="{{addOne @index}}" readonly="readonly"
            >
        </td>
        <td class="name">
            <input type="text" class="remuneration1" name="stuname"
                   value="{{fnameL2}}" onclick="clickName($(this))"
            >
        </td>
        <td>
            <input type="text" name="scfidcardno" class="text"
                   value="{{cfidcardno}}"/>
        </td>
		{{#compare cfsex 1}}
        <td>
            <input type="text" name="scfsex" class="text"
                   value="男"/></td>
        {{else}}
        <td>
            <input type="text" name="scfsex" class="text"
                   value="女"/></td>
        {{/compare}}
        <td>
            <input type="text" name="cfsjhm" class="text"
                   value="{{cfsjhm}}"/></td>
        <td>
            <input type="text" name="scfgrade" class="text scfgrade"
                   value=""/></td>
        <td>
            <input type="text" name="scfremark" class="text"
                   value=""/></td>
        
    </tr>
    {{/each}}
</script>
<script id="table-page" type="text/x-handlebars-template">

</script>
<script>



  //弹出框模版文件
    var myTemplate = Handlebars.compile($("#table-template").html());
    //回填数据模版文件
    var myTemplate1 = Handlebars.compile($("#table-template1").html());

    var updateid = new Array();
    var myTemplate1html = "";
    //处理删除时候的this缓存
    var _this;
    //判断当前操作使增加还是删除
    var stu;
    //返回的当前选中的元素序号
    var feq;
    //元素更新标示
    var updata;

    $(".addTable").click(function () {
        $('#modal-overlay').css('visibility', 'visible')
        $('.modal-data1').css('visibility', 'visible')
        $('input:checkbox').removeAttr('checked');
        $('.page').show();
    })


    //删除一行
    $(".deleteTable").click(function () {
        var tr_len = $("#recordinList tr").length;
        if (tr_len == 1) {

        } else {
            updateid.push($('#recordinList input:first').val())
            $('#recordinList tr:last').remove();
            //刷新模版
            myTemplate1html = "";
        }
    })
	//改变审核状态
    function audit(num) {
        var fid = $("input:hidden[name=fid]").val();
        var fnumber =$("input:text[name=fnumber]").val();
        if(num == 3){//反审核
            $('#modal-overlay').css('visibility', 'visible');
            $('.modal-data10').css('visibility', 'visible');
            $("#againstAuditsubmit").click(function(){
                var againstAuditcomment = $("#againstAuditcomment").val();
                if (againstAuditcomment == null || againstAuditcomment == '') {
                    againstAuditcomment = "不同意";
                }
                $.ajax({
                    url:'<%=path%>/DrivingSys/againstCheckSimulationQuargeActiviti',
                    type:'post',
                    data:{'fid':fid,'fnumber':fnumber,'againstAuditcomment':againstAuditcomment},
                    dataType:'json',
                    success:function(result){
                        if(result["result"] == 'success'){
                            showAlert("反审核成功!","querySimulationQuarge/look.action");
                        }else{
                            alert("反审核失败!")
                        }
                    },
                    error:function () {alert('Error')}
                })
            })
        }
        if(num == 4){//提交
            $.messager.confirm('提示', '是否提交?', function (r) {
                if(r){
                    $.ajax({
                        url:'<%=path%>/DrivingSys/submitSimulationQuargeActiviti',
                        type:'post',
                        data:{'fid':fid,'fnumber':fnumber},
                        dataType:'json',
                        success:function(result){
                            if(result["result"] == 'success'){
                                showAlert("提交成功!","querySimulationQuarge/look.action");
                               /* alert("提交成功!")
                                setTimeout(function () {
                                    location="<%=path%>/DrivingSys/querySimulationQuarge/look.action";
                                }, 1000);*/
                            }else{
                                alert("提交失败!")
                            }
                        },
                        error:function () {alert('Error')}
                    })
                }
            })
        }
        if(num == 5){//审核
            $('#modal-overlay').css('visibility', 'visible');
            $('.modal-data9').css('visibility', 'visible');
            $("#auditsubmit").click(function() {
                var agree = $("input:radio[name=check]:checked").val();//同意不同意
                var auditcomment = $("#auditcomment").val();
                if (agree == null) {
                    alert("你选择你的意见");
                    return false;
                }
                if (auditcomment == null || auditcomment == '') {
                    if(agree == "1"){
                        auditcomment = "同意";
                    }else{
                        auditcomment = "不同意";
                    }
                }
                $.ajax({
                    url:'<%=path%>/DrivingSys/checkSimulationQuargeActiviti',
                    type:'post',
                    data:{'fid':fid,'fnumber':fnumber,'agree':agree,'auditcomment':auditcomment},
                    dataType:'json',
                    // async: true,
                    success:function(result){
                        if(result["result"] == 'success'){
                            showAlert("审核成功!","querySimulationQuarge/look.action");
                            /*alert("审核成功!")
                            setTimeout(function () {
                                location="<%=path%>/DrivingSys/querySimulationQuarge/look.action";
                            }, 1000);*/
                        }else{
                            alert("审核失败!")
                        }
                    },
                    error:function () {alert('Error')}
                })
            })
        }
    }


    //注册一个比较大小的Helper,判断v1是否大于v2
    Handlebars.registerHelper("compare", function (v1, v2, options) {
        if (v1 == v2) {
            //满足添加继续执行
            return options.fn(this);
        } else {
            //不满足条件执行{{else}}部分
            return options.inverse(this);
        }
    });
    //注册一个比较内容是否为空
    Handlebars.registerHelper("isNull", function (v1, options) {
        if (v1 != "") {
            //满足添加继续执行
            return options.fn(this);
        } else {
            //不满足条件执行{{else}}部分
            return options.inverse(this);
        }
    });
    //注册索引+1的helper
    Handlebars.registerHelper("addOne", function (index) {
        //返回+1之后的结果
        //判断当前选中的元素

        //返回当前元素的序列号
        if (updata == 20) {
            updata = 0;
            return feq;
        }

        var tr_len = $("#recordinList .tr_td").length + 1;

        return tr_len + index;

    });

    //弹出模式框
    function clickName(e) {
        $(".addTable").click();
        _this = e.parent().parent();
        stu = 20;
        updata = 20;
    }

    /*function clickadd() {
        updata = 0;
    }*/
    $('.positiongrade2').click(function () {
        $('#modal-overlay').css('visibility', 'visible')
        $('.modal-data2').css('visibility', 'visible')
        $('input:checkbox').removeAttr('checked');
    })
    //关闭模式窗口
    $('.btn').click(function () {
        $('#modal-overlay').css('visibility', 'hidden')
        $('.modal-data').css('visibility', 'hidden')
        $('.modal-data1').css('visibility', 'hidden')
        $('.modal-data2').css('visibility', 'hidden')
        $('.modal-data9').css('visibility', 'hidden')
        $('.modal-data10').css('visibility', 'hidden')
        $('input:checkbox').removeAttr('checked');
    })

  //摸态框设置单击选中
  $(document).on('click','.xysj td:not(.td)',function(){
      if($(this).parent().find("input:checkbox[name=remuneration1]").is(':checked')){
          $(this).parent().find("input:checkbox[name=remuneration1]").removeAttr("checked");
      }else{
          $(this).parent().find("input:checkbox[name=remuneration1]").attr("checked",":checked")
      }
  })
  //摸态框设置双击确定
  $(document).on('dblclick','.xysj td',function(){
      var id =  $(this).parent().find("input:checkbox[name=remuneration1]").val();
      if(id == null || id == ''){//防止没有取到id报错
          return false;
      }
      $.ajax({
          url: '<%=path%>/DrivingSys/selStudentsByFid',
          type: "post",
          data: {'id': id},
          dataType: "json",
          success: function (res) {
              var htmlhead = "<tr class='tr'> <td class='fseq'>序号</td> <td align='center'>学员</td><td align='center'>身份证号码</td><td align='center'>性别</td> <td align='center'>手机号码</td> <td align='center'>考试分数</td> <td align='center'>备注</td>  </tr>"

              if (stu == 20) {
                  _this.remove();
                  feq = _this.find('.fseq').val();
              }
              var htmlhead = $('#recordinList').html();
              $('#recordinList').html(htmlhead + myTemplate1(res));

              $('#modal-overlay').css('visibility', 'hidden')
              $('.modal-data1').css('visibility', 'hidden')
          },
          error: function () {
              alert('Error');
          }
      });
  })
    //把选中的信息名称填充到输入框中
    $('.subtn1').click(function () {
        var spCodesTemp = "";
        $('input:checkbox[name=remuneration1]:checked').each(function (i) {
            if (0 == i) {
                //把学生id增加到字表中
                spCodesTemp = $(this).val();

            } else {
                spCodesTemp += ("," + $(this).val());

            }
        });
        if(spCodesTemp == ''){
            alert("至少选择一条数据！")
            return false;
        }
        $.ajax({
            url: '<%=path%>/DrivingSys/selStudentsByFid',
            type: "post",
            data: {'id': spCodesTemp},
            dataType: "json",
            success: function (res) {
                 var htmlhead = "<tr class='tr'> <td class='fseq'>序号</td> <td align='center'>学员</td><td align='center'>身份证号码</td><td align='center'>性别</td> <td align='center'>手机号码</td> <td align='center'>考试分数</td> <td align='center'>备注</td>  </tr>" 

                if (stu == 20) {
                    _this.remove();
                    feq = _this.find('.fseq').val();
                }

                var htmlhead = $('#recordinList').html();
                $('#recordinList').html(htmlhead + myTemplate1(res));

                $('#modal-overlay').css('visibility', 'hidden')
                $('.modal-data1').css('visibility', 'hidden')
            },
            error: function () {
                alert('Error');
            }
        });

    });

    var beginTime = $("#datemin")
    var endTime = $("#datemax")
    var myname = $('.name1').val();
    var cflxdh = $('.cflxdh').val();

    //点击查找按钮
    $('.findBtn1').click(function () {
        index = 1
        myname = $('.name1').val();
        cflxdh = $('.cflxdh').val();
        $('#studebntList').html("<div class='loading'></div>");
        $.ajax({
            url: '<%=path%>/DrivingSys/simulationQuargeGetStudent?pindex=0&name=' + myname + '&cflxdh=' + cflxdh + '&beginTime=' + beginTime.val() + '&endTime=' + endTime.val(),
            type: "get",
            dataType: "json",
            success: function (res) {
                $('#studebntList').html(myTemplate(res));
                $('#totalPage').val(res.pb);
            },
            error: function () {
                alert('Error');
            }
        });

    })

    $('.indexPage').click(function () {
        var index = 1
        myname = $('.name1').val();
        $('#index').val(1)
        $.ajax({
            url: '<%=path%>/DrivingSys/simulationQuargeGetStudent?pindex=' + index + '&cflxdh=' + cflxdh + '&name=' + myname + '&beginTime=' + beginTime.val() + '&endTime=' + endTime.val(),
            type: "get",
            dataType: "json",
            success: function (json) {
                $('#studebntList').html(myTemplate(json));
            },
            error: function () {
                alert('Error');
            }
        });
    })


    $('.endPage').click(function () {
        myname = $('.name1').val();
        var index = parseInt($('#totalPage').val())
        $('#index').val(index)
        $.ajax({
            url: '<%=path%>/DrivingSys/simulationQuargeGetStudent?pindex=' + index + '&cflxdh=' + cflxdh + '&name=' + myname + '&beginTime=' + beginTime.val() + '&endTime=' + endTime.val(),
            type: "get",
            dataType: "json",
            success: function (json) {
                $('#studebntList').html(myTemplate(json));
            },
            error: function () {
                alert('Error');
            }
        });
    })


    $('.nextPage').click(function () {
        myname = $('.name1').val();
        var total = parseInt($('#totalPage').val())
        if ($('#index').val() < total) {
            var index = $('#index').val() - 0 + 1
            $('#index').val(index)
            $.ajax({
                url: '<%=path%>/DrivingSys/simulationQuargeGetStudent?pindex=' + index + '&cflxdh=' + cflxdh + '&name=' + myname + '&beginTime=' + beginTime.val() + '&endTime=' + endTime.val(),

                type: "get",
                dataType: "json",
                success: function (json) {
                    $('#studebntList').html(myTemplate(json));
                },
                error: function () {
                    alert('Error');
                }
            });
        } else {
            alert("已经到尾页了！")
        }
    })


    $('.prevPage').click(function () {
        myname = $('.name1').val();
        if ($('#index').val() != '1') {
            var index = $('#index').val() - 0 - 1
            $('#index').val(index)
            $.ajax({
                url: '<%=path%>/DrivingSys/simulationQuargeGetStudent?pindex=' + index + '&cflxdh=' + cflxdh + '&name=' + myname + '&beginTime=' + beginTime.val() + '&endTime=' + endTime.val(),
                type: "get",
                dataType: "json",
                success: function (json) {
                    $('#studebntList').html(myTemplate(json));
                },
                error: function () {
                    alert('Error');
                }
            });
        } else {
            alert("已经是首页了")
        }
    })
    function back(){
        parent.closeSelectCard()

        //location="<%=path%>/DrivingSys/querySimulationQuarge/look.action";
    }
    /*$(".input_submit").click(function(){
        var dd=$("#cfbizstate").val();
        alert(dd)
    })*/
  function subForm() {
      var count = 0;
      $("input:hidden[name=sstuid]").each(function (i) {
          count++;
      })
      if (count == 0) {
          alert("请先添加学员!")
          return false;
      }
      $("input[type='submit']").attr("disabled", "disabled");
  }
  //键盘事件
  $(".scfgrade").live('keyup', function(event) {
      //最后一位是小数点的话，移除
      var $amountInput = $(this);
      //响应鼠标事件，允许左右方向键移动
      event = window.event || event;
      if(event.keyCode == 37 | event.keyCode == 39) {
          return;
      }
      var re= /^((?!0)\d{1,2}|100)$/;
      if(!re.test($amountInput.val())){
          $(this).val("");
      }
      //先把非数字的都替换掉，除了数字和.
      /* $amountInput.val($amountInput.val().replace(/[^\-?\d.]/g, "").
       //只允许一个小数点
       replace(/^\./g, "").replace(/\.{2,}/g, ".").
       //只能输入小数点后两位
       replace(".", "$#$").replace(/\./g, "").replace("$#$", ".").replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3'));*/
  });
  $(".scfgrade").live('blur',function (obj) {
      if($(this).val() == "" || $(this).val() == null) {
          $(this).val(0);
      }
  })
</script>
</html>